<li class="item-lesson clearfix" id="lesson-{{ lesson.id }}">
	<div class="item-line"></div>
	<div class="item-content">
	  {% set mediaStatus = lesson.mediaStatus|default(null) %}

		{% if lesson.type in ['video', 'live'] %}
		  {% if mediaStatus == 'waiting' %}
			<span class="glyphicon glyphicon-facetime-video text-warning"></span>
		  {% elseif mediaStatus == 'doing' %}
			<span class="glyphicon glyphicon-facetime-video text-info"></span>
		  {% elseif mediaStatus == 'error' %}
			<span class="glyphicon glyphicon-facetime-video text-danger"></span>
		  {% else %}
			<span class="glyphicon glyphicon-facetime-video text-success"></span>
		  {% endif %}
		{% endif %}

		课时 <span class="number">{{ lesson.number }}</span>： {{ lesson.title }}

		{% if lesson.type in ['live'] %}
		  <span class="text-muted">{{ lesson.startTime|date_format }}</span>
		{% endif %}

		{% if lesson.status == 'unpublished' %}
		  <span class="text-warning">({{'未发布'|trans}})</span>
		{% endif %}

		{% if lesson.status == 'published' and not lesson.isEnd %}
		  <span class="text-warning">({{'直播未结束'|trans}})</span>
		{% endif %}

		{% if lesson.status == 'published' and lesson.isEnd and lesson.type == 'live' and lesson.replayStatus == 'ungenerated' %}
		  <span class="text-warning">({{'未录制回放'|trans}})</span>
		{% elseif lesson.status == 'published' and lesson.isEnd and lesson.type == 'live' and lesson.replayStatus == 'generated' %}
		  <span class="text-warning">({{'已录制回放'|trans}})</span>
		{% endif %}

	</div>
	<div class="item-actions prs">
		<a class="btn btn-link" title="{{'预览'|trans}}" href="{{ path('course_learn', {id:course.id, preview:1}) }}#lesson/{{ lesson.id }}" target="_blank"><span class="glyphicon glyphicon-eye-open"></span></a>

		{% if lesson.status =='published' and lesson.isEnd and lesson.type == 'live' and lesson.replayStatus == 'generated' %}
			<a href="#modal" class="btn btn-link " title="{{'编辑'|trans}}" data-toggle="modal" data-url="{{ path('live_course_manage_lesson_replay_edit',{ lessonId:lesson.id ,courseId:course.id}) }}" ><span class="glyphicon glyphicon-th-list"></span></a>
		{% endif %}

		{% if lesson.status == 'published'  and lesson.type == 'live' and lesson.isEnd  and  lesson.canRecord|default(false) %}
			<button class="btn btn-link replay-lesson-btn"
			{% if lesson.replayStatus == 'ungenerated' %}
			title="{{'录制'|trans}}"
			{% else %}
			title="{{'重新录制'|trans}}"
			{% endif %}
			 data-url="{{ path('live_course_lesson_replay_create', {courseId:course.id, lessonId:lesson.id}) }}"><span class="glyphicon glyphicon-facetime-video"></span></button>
		{% endif %}



	</div>
</li>